
// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init({
  env: 'vclass-34p02'
})

const db = cloud.database()
exports.main = async(event, context) => {
  return await db.collection('square').where({
      _id: event.id
    })
    .update({
      data: {
        redu: event.redu
      },
    })

}